-- GENERATED SPELL FOR [Living Mojo] --


function spell0_29830(pUnit, Event) --@Mojo Puddle,Self--
pUnit:FullCastSpellOnTarget(55627,pUnit)
pUnit:RegisterEvent('Sorts_29830', 10000, 1)
end

function spell1_29830(pUnit, Event) --@Mojo Puddle,Self--
pUnit:FullCastSpellOnTarget(58994,pUnit)
pUnit:RegisterEvent('Sorts_29830', 10000, 1)
end

function spell2_29830(pUnit, Event) --@Mojo Wave,Self--
pUnit:FullCastSpellOnTarget(55626,pUnit)
pUnit:RegisterEvent('Sorts_29830', 9000, 1)
end

function spell3_29830(pUnit, Event) --@Mojo Wave,Self--
pUnit:FullCastSpellOnTarget(58993,pUnit)
pUnit:RegisterEvent('Sorts_29830', 9000, 1)
end

function Sorts_29830(pUnit, Event)
local choix_sorts_29830 = math.random(0, 3)
if choix_sorts_29830 == 0 then
pUnit:RegisterEvent('spell0_29830', 1, 1)
end
if choix_sorts_29830 == 1 then
pUnit:RegisterEvent('spell1_29830', 1, 1)
end
if choix_sorts_29830 == 2 then
pUnit:RegisterEvent('spell2_29830', 1, 1)
end
if choix_sorts_29830 == 3 then
pUnit:RegisterEvent('spell3_29830', 1, 1)
end
end

function mob29830_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29830', math.random(1500, 3000), 1)
end

function mob29830_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29830_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29830_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29830, 1, 'mob29830_Action')
RegisterUnitEvent(29830, 2, 'mob29830_Leave')
RegisterUnitEvent(29830, 3, 'mob29830_Kill')
RegisterUnitEvent(29830, 4, 'mob29830_Die')
